﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// System_Dictionary数据模型对象
    /// </summary>
    [Serializable]
    public partial class System_DictionaryMod
    {
        /// <summary>
        /// 初始化System_Dictionary数据模型对象
        /// </summary>
        public System_DictionaryMod()
        {
            
        }
        /// <summary>
        /// 初始化System_Dictionary数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="name">Name</param>
        /// <param name="dictID">DictID</param>
        /// <param name="isSystem">IsSystem</param>
        public System_DictionaryMod(string iD,string name,string dictID,bool isSystem)
        {
            //给ID字段赋值
            this.ID = iD;
            //给Name字段赋值
            this.Name = name;
            //给DictID字段赋值
            this.DictID = dictID;
            //给IsSystem字段赋值
            this.IsSystem = isSystem;
        }
        /// <summary>
        /// 初始化System_Dictionary数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="name">Name</param>
        /// <param name="dictID">DictID</param>
        /// <param name="description">Description</param>
        /// <param name="isSystem">IsSystem</param>
        public System_DictionaryMod(string iD,string name,string dictID,string description,bool isSystem)
        {
            //给ID字段赋值
            this.ID = iD;
            //给Name字段赋值
            this.Name = name;
            //给DictID字段赋值
            this.DictID = dictID;
            //给Description字段赋值
            this.Description = description;
            //给IsSystem字段赋值
            this.IsSystem = isSystem;
        }
        
		//属性存储数据的变量
        private string _iD;
        private string _name;
        private string _dictID;
        private string _description;
        private bool _isSystem;
        
        /// <summary>
        /// ID
        /// </summary>
        public string ID
        {
            get { return this._iD; }
            set { this._iD = value; }
        }
        /// <summary>
        /// Name
        /// </summary>
        public string Name
        {
            get { return this._name; }
            set { this._name = value; }
        }
        /// <summary>
        /// DictID
        /// </summary>
        public string DictID
        {
            get { return this._dictID; }
            set { this._dictID = value; }
        }
        /// <summary>
        /// Description
        /// </summary>
        public string Description
        {
            get { return this._description; }
            set { this._description = value; }
        }
        /// <summary>
        /// IsSystem
        /// </summary>
        public bool IsSystem
        {
            get { return this._isSystem; }
            set { this._isSystem = value; }
        }
        
        /// <summary>
        /// 对比两个System_Dictionary数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的System_Dictionary数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成System_Dictionary数据模型对象
            System_DictionaryMod system_DictionaryMod = obj as System_DictionaryMod;
            //判断是否转换成功
            if (system_DictionaryMod == null) return false;
            //进行匹配属性的值
            return
                //判断ID是否一致
                this.ID == system_DictionaryMod.ID &&
                //判断Name是否一致
                this.Name == system_DictionaryMod.Name &&
                //判断DictID是否一致
                this.DictID == system_DictionaryMod.DictID &&
                //判断Description是否一致
                this.Description == system_DictionaryMod.Description &&
                //判断IsSystem是否一致
                this.IsSystem == system_DictionaryMod.IsSystem;
        }
        /// <summary>
        /// 将当前System_Dictionary数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将System_Dictionary数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将ID进行按位异或运算处理
                (this.ID == null ? 2147483647 : this.ID.GetHashCode()) ^
                //将Name进行按位异或运算处理
                (this.Name == null ? 2147483647 : this.Name.GetHashCode()) ^
                //将DictID进行按位异或运算处理
                (this.DictID == null ? 2147483647 : this.DictID.GetHashCode()) ^
                //将Description进行按位异或运算处理
                (this.Description == null ? 2147483647 : this.Description.GetHashCode()) ^
                //将IsSystem进行按位异或运算处理
                this.IsSystem.GetHashCode();
        }
        /// <summary>
        /// 将当前System_Dictionary数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前System_Dictionary数据模型对象转换成字符串副本
            return
                "[" +
                //将ID转换成字符串
                this.ID + "," +
                //将Name转换成字符串
                this.Name + "," +
                //将DictID转换成字符串
                this.DictID + "," +
                //将IsSystem转换成字符串
                this.IsSystem +
                "]";
        }
    }
}
